xen/common/Makefile: introduce HAS_{CPUFREQ,PCI,PASSTHROUGH,NS16550,KEXEC}
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 9 Feb 2012 11:33:28 +0000 (11:33 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 9 Feb 2012 11:33:28 +0000 (11:33 +0000)
- make the compilation of ns16550.c depend upon HAS_NS16550;

- make the compilation of cpufreq depend upon HAS_CPUFREQ;

- make the compilation of pci depend upon HAS_PCI;

- make the compilation of passthrough depend upon HAS_PASSTHROUGH;

- make the compilation of kexec depend upon HAS_KEXEC.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/ia64/Rules.mk        |    5 +++++
 xen/arch/x86/Rules.mk         |    5 +++++
 xen/common/Makefile           |    2 +-
 xen/common/shutdown.c         |    4 ++++
 xen/drivers/Makefile          |    6 +++---
 xen/drivers/char/Makefile     |    2 +-
 xen/drivers/char/console.c    |    4 ++++
 xen/include/asm-ia64/config.h |    1 +
 xen/include/asm-x86/config.h  |    1 +
 9 files changed, 25 insertions(+), 5 deletions(-)

xen/arch/ia64/Rules.mk
xen/arch/x86/Rules.mk
xen/common/Makefile
xen/common/shutdown.c
xen/drivers/Makefile
xen/drivers/char/Makefile
xen/drivers/char/console.c
xen/include/asm-ia64/config.h
xen/include/asm-x86/config.h

index bef11c3196293982a6d1ecb137b388b58bcc12ea..054b4def944c62aef39c58fbca307a4de544a3e4 100644 (file)
@@ -4,6 +4,11 @@
 ia64 := y
 HAS_ACPI := y
 HAS_VGA  := y
+HAS_CPUFREQ := y
+HAS_PCI := y
+HAS_PASSTHROUGH := y
+HAS_NS16550 := y
+HAS_KEXEC := y
 xenoprof := y
 no_warns ?= n
 vti_debug ?= n
index 9fc6d42f9f5553d6cd449228cf4518e4f6512807..65275af9e8bee4fa543e23cafeb694debb09f796 100644 (file)
@@ -3,6 +3,11 @@
 
 HAS_ACPI := y
 HAS_VGA  := y
+HAS_CPUFREQ := y
+HAS_PCI := y
+HAS_PASSTHROUGH := y
+HAS_NS16550 := y
+HAS_KEXEC := y
 xenoprof := y
 
 #
index 1d85e6586f05da4297d72acf9362ef60d546b55f..9249845832361da62caffebc4de2d8efad1d7ce8 100644 (file)
@@ -8,7 +8,7 @@ obj-y += grant_table.o
 obj-y += irq.o
 obj-y += kernel.o
 obj-y += keyhandler.o
-obj-y += kexec.o
+obj-$(HAS_KEXEC) += kexec.o
 obj-y += lib.o
 obj-y += memory.o
 obj-y += multicall.o
index e356e8659148195d1a26237765a4557cb351294d..b18ef5de6c0352cd64a350db071c022ed9aa6745 100644 (file)
@@ -6,7 +6,9 @@
 #include <xen/delay.h>
 #include <xen/shutdown.h>
 #include <xen/console.h>
+#ifdef CONFIG_KEXEC
 #include <xen/kexec.h>
+#endif
 #include <asm/debugger.h>
 #include <public/sched.h>
 
@@ -58,7 +60,9 @@ void dom0_shutdown(u8 reason)
     case SHUTDOWN_watchdog:
     {
         printk("Domain 0 shutdown: watchdog rebooting machine.\n");
+#ifdef CONFIG_KEXEC
         kexec_crash();
+#endif
         machine_restart(0);
         break; /* not reached */
     }
index eb4fb61554e74fb94dca71df6a4d499a2e526005..723937533173f3f33dbf7d04143c8524b00d2abe 100644 (file)
@@ -1,6 +1,6 @@
 subdir-y += char
-subdir-y += cpufreq
-subdir-y += pci
-subdir-y += passthrough
+subdir-$(HAS_CPUFREQ) += cpufreq
+subdir-$(HAS_PCI) += pci
+subdir-$(HAS_PASSTHROUGH) += passthrough
 subdir-$(HAS_ACPI) += acpi
 subdir-$(HAS_VGA) += video
index ded9a94cc16e490f98e9ed89c4c37671909fc598..19250c8810ae3fcab50642186492db7bc12c59d5 100644 (file)
@@ -1,3 +1,3 @@
 obj-y += console.o
-obj-y += ns16550.o
+obj-$(HAS_NS16550) += ns16550.o
 obj-y += serial.o
index dc9b9c58cd17bff31d520a3c8be223c9c75d3787..64a99a67f652af908cd190be4717370684001f31 100644 (file)
@@ -22,7 +22,9 @@
 #include <xen/guest_access.h>
 #include <xen/shutdown.h>
 #include <xen/vga.h>
+#ifdef CONFIG_KEXEC
 #include <xen/kexec.h>
+#endif
 #include <asm/debugger.h>
 #include <asm/div64.h>
 #include <xen/hypercall.h> /* for do_console_io */
@@ -963,7 +965,9 @@ void panic(const char *fmt, ...)
 
     debugger_trap_immediate();
 
+#ifdef CONFIG_KEXEC
     kexec_crash();
+#endif
 
     if ( opt_noreboot )
     {
index 01734879a83c17bbf56a0dc3f68ecaa8ab44e163..6e9fc98d0ebd85a1c7c4b152b11611822f49162b 100644 (file)
@@ -20,6 +20,7 @@
 #define CONFIG_EFI
 #define CONFIG_EFI_PCDP
 #define CONFIG_SERIAL_SGI_L1_CONSOLE
+#define CONFIG_KEXEC 1
 #define CONFIG_XENOPROF 1
 
 #define CONFIG_XEN_SMP
index 18d0a052c15f23f742ac0e4ae6673ee3919402bb..28f5e2941fe870e87a955af07b4ec88a335d9879 100644 (file)
@@ -49,6 +49,7 @@
 #define CONFIG_HOTPLUG_CPU 1
 
 #define CONFIG_XENOPROF 1
+#define CONFIG_KEXEC 1
 
 #define HZ 100